package com.itcncp.common.pingplusplus;

/**
 * Ping++ Base class
 */
public abstract class Pingpp {
    /**
     * Ping++ API BASE URL
     */
    public static final String LIVE_API_BASE = "https://api.pingxx.com";
    /**
     * version
     */
    public static final String VERSION = "2.3.4";
    /**
     * api key
     */
    public static volatile String apiKey="sk_live_CGCWnDe5KiHGXnjbPGSaPqzL";

    public static volatile String apiVersion=VERSION;

    public static volatile String appId="app_fXLCy1ib90OSmn1y";

    public static String AcceptLanguage = "zh-CN";

    private static volatile boolean verifySSL = true;
    private static volatile String apiBase = LIVE_API_BASE;

    public static volatile String privateKey=
            "MIICXAIBAAKBgQC4/2eEsbNhCy4rv5wpDc7p+djrlacic3Wz61cnoD1tMQDYfvoN" +
            "xZqWNFTGfANiRQ8wIPnlOrcwi6GmhwRoCT7CWEPvHszfZd9osXFzWzWenG+LHBjZ" +
            "wPCwoFzOx7YNO7cHwe9Ws9A+3NK+HWoJ8uIWc6PrNExF1pHJsxUcyXuL+QIDAQAB" +
            "AoGAfLPlguQKR8Myl1jtGhttu/ioSX2ykR2FXQep01NHtOAQct99DWWDY/bYoocb" +
            "/NUSfN3ttaCTtcyZ5dgjl0GMJG0xDVU9FHyFZ4MN73WNTFWI2Et1Gi/gKKW5+CeT" +
            "SuSRwSuXfyVjSexZn+bZvpI+VBMQzsWOQE6CEPRRJIgHggECQQDop5F2X50fNVqS" +
            "JKQ330zGZ/ks1WwZOESS2H6OWO3SLMLrNqC8VnlmvCcK3xR7iRZFkU7IoQ1w40c+" +
            "L8t8pIg5AkEAy4+gLPEGNW5TxiG7njr8Zb9DPRAiW1MZ/geFgrN4J9zznafTeY/s" +
            "XsFCWr4/Ls1gk0rZ5uzzywmgHkvyE+2hwQJBALUtKR4hv136UpnUZv4LquInPego" +
            "G5JYOy6P4Z5AqpMtwG0jkXCZdtkGVPEmX/EEBJAQZGXg5XKvy18mITTjfCECQFW5" +
            "S1wBuHqh1pe2tvsgng//JsK9W6qX6XdIFZqAF9a5vsIi3fTwfjs9KcNrINKF3OjK" +
            "ec889EIJ8KsxkmWACkECQGFzr19NlvZiJtzQYeiQhNawRfqfH7c7yKtVmVu15msF" +
            "hhzwZvHN6jGSNcBBC2LF+mzF4dR0HhkpFR6BzZPHii4=";
    public static volatile String privateKeyPath;

    public static Boolean DEBUG = false;

    /**
     * (FOR TESTING ONLY)
     * If you'd like your API requests to hit your own (mocked) server,
     * you can set this up here by overriding the base api URL.
     * @param overriddenApiBase API 地址
     */
    public static void overrideApiBase(final String overriddenApiBase) {
        apiBase = overriddenApiBase;
    }

    /**
     * (FOR TESTING ONLY)
     * Only disable SSL verification if you're using your own (mocked) server.
     * Disabling verification on pingxx.com is not supported
     * @param verify 是否验证 ssl
     */
    public static void setVerifySSL(boolean verify) {
        verifySSL = verify;
    }

    /**
     * get SSL state
     *
     * @return true is set SSL ,false is not set SSL
     */
    public static boolean getVerifySSL() {
        return verifySSL;
    }

    /**
     * get api url
     *
     * @return String  api url
     */
    public static String getApiBase() {
        return apiBase;
    }

    /**
     * set api url
     *
     * @param apiBase apiBase API 地址
     */
    public static void setApiBase(String apiBase) {
        Pingpp.apiBase = apiBase;
    }
}
